<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib prefix="user" uri="/WEB-INF/tlds/userName.tld"%>
<%@ taglib prefix="handle" uri="/WEB-INF/tlds/handleMsg.tld"%>
<html>
<head>
<meta name="decorator" content="sysDefault" />
<style type="text/css">
.table-striped1>tbody>tr:nth-child(odd)>td,.table-striped1>tbody>tr:nth-child(odd)>th
{
	background-color: #f9f9f9;
}
.table-striped1>tbody>tr:nth-child(odd)>th
</style>
<script type="text/javascript">
	$(function() {

	});

	function funform(url, target) {
		window.open(url, target);
	}

	function confireStatus() {
		//return Oosp_Confirm('删除表单 --  -- ,确认删除？',url);
		return confirm("确认删除该流程？");
	}
</script>
</head>
<body>
	<form:form name="listForm"
		action="${contextPath}/bpm/workflow/getAllWorkFlow"
		modelAttribute="backupBrand" method="post" class="form-inline"
		role="form">
		<div class="container-fluid">
			<div class="row">
				<div class="col-xs-12">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3 class="panel-title">流程列表</h3>
						</div>
						<div class="form-group">
							<input name="subject" value="${subject}" class="form-control" placeholder="主题" />
						</div>
						<button class="btn btn-primary" type="submit">查询</button>
						<table class="table table-striped1 table-hover ">
						             

							<thead>
							</thead>

							<thead>
								<tr>
									<th>主题</th>
									<th>流程定义</th>
									<th>流程状态</th>
									<th>创建人</th>
									<th>创建时间</th>
									<th>当前处理</th>
									<th>当前处理人</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${page.list}" var="proInst">
									<tr>
										<td>${proInst.subject}</td>
										<td>${proInst.procDefName}</td>
										<td><c:if test="${proInst.status == 'draft'}">
											起草
										</c:if> <c:if test="${proInst.status == 'running'}">
											审批中
										</c:if> <c:if test="${proInst.status == 'end'}">
											结束
										</c:if></td>
										<td><user:username userId="${proInst.createBy}"></user:username></td>
										<td><fmt:formatDate value="${proInst.createTime}"
												pattern="yyyy-MM-dd HH:mm" /></td>
										<handle:handleMsg proInstID="${proInst.id}"></handle:handleMsg>
										<td><a
											href="#" onclick="funform('${contextPath}/bpm/workflow/view?proInsId=${proInst.id}','_blank');">查看</a>
										</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
						<div class="panel-footer">
							<pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}"
								url="" total="${page.total}" />
							<script type="text/javascript" src="${staticPath}/js/list.js"></script>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form:form>
</body>
</html>